define(['jquery'],()=>{
    class DataD{
        constructor(){
            this.init()
        }
        init(){
            $.get('../data/goods.json','json')
            .then(data=>{
                var res12 = data.slice(200,210)
                res12.forEach(item=>{
                $('.xuan4')[0].innerHTML += `
                    <div class="po1">
                        <li>
                            <div class="imgs">
                                <a href="http://localhost:8888/html/details.html?id=${item.goods_id}"><img src="${item.img_small_logo}" alt=""></a>
                            </div>
                            <div class="content">
                                <a href="http://localhost:8888/html/details.html?id=${item.goods_id}">
                                    <div class="title">
                                        <span class="name">${item.title}</span>
                                    </div>
                                </a>
                                <div class="price">
                                    <span>￥</span>
                                    <span>${item.price}</span>
                                </div>
                            </div>
                        </li>
                    </div>
                `
                })
            })
        }
    }
    return {
        DataD : new DataD()
    }
})